/*
 * @Author: wanggaoyang wgy910528@163.com
 * @Date: 2022-08-11 22:54:46
 * @LastEditors: wanggaoyang wgy910528@163.com
 * @LastEditTime: 2022-08-11 23:12:30
 * @FilePath: \shop-admin\src\composables\auth.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import {
    useCookies
} from '@vueuse/integrations/useCookies'
const TokenKey = 'admin-token'
const cookies = useCookies()

// 获取token
export const getToken = () => {
    return cookies.get(TokenKey)
}
// 设置token
export const setToken = (token) => {
    return cookies.set(TokenKey,token)
}
// 删除token
export const removeToken = () => {
    return cookies.remove(TokenKey)
}